package edu.xust.controller;

import com.alibaba.fastjson.JSON;
import edu.xust.pojo.Story;
import edu.xust.service.CopyOneService;
import edu.xust.service.RoleService;
import edu.xust.service.SectionOneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/copy")
public class CopyOneController {
    @Autowired
    CopyOneService copyOneService;


    @RequestMapping(value = "/copy1", produces = "application/json;charset=utf-8")
    @ResponseBody
    public String patOne(Integer id) {
        Story part = copyOneService.getPart(id);
        String s = JSON.toJSONString(part);
        return s;
    }
}
